#include "defines.txt"

if (isset(f5)) {
  load.pic(v0);
  draw.pic(v0);
  discard.pic(v0);
  set.horizon(37);
  if (v1 == 6) {
    position(o0,79,155);
  }
  draw(o0);
  show.pic();
}
if (posn(o0,69,167,91,167)) {
  new.room(6);
}
if (said("talk","kartik")) {
  if(has("spell book")){
    print("Kartik: Now get outta here i'm trynna practice my spells.");
  }
  else {
  print("O.K listen, i'm gonna give you this spell book, it has only three spells.");
  print("You should use them only in need.");
  print("Now get out of here.");
  print("Oh yeah I think i'm gonna take your key so i can return to my trunk again.");
  get("spell book");
  drop("key");
  v3 += 6;
  }
}
if (said("look")) {
  print("You feel this room is wierd as it only has a huge Trunk at it's back.");
}
if (said("look","kartik")) {
  print("He is rather busy paractising a spell.");
}
if (said("open","trunk")) {
  if (posn(o0,40,80,81,88)) {
    load.view(9);
    set.view(o4,9);
    position(o4,15,78);
    animate.obj(o4);
    start.cycling(o4);
    draw(o4);
    print("Biru: WOO What's that!.");
    print("Kartik: Hello I'm Kartik thakur.");
    print("Biru: So why did you come here .");
    print("Kartik: You don't understand.You set me free.");
    print("Biru: That means your'e gonna grant me a wish aren't you?.");
  }
  else {
    print("You are not close enough.");
  }
}
if (has("spell book")) {
  if (said("open","book")) {
    print("The spells are as follows-.");
    print("DHOOA: Makes everyone go blind, except you.");
    print("KALI: You can open any door with this one.");
    print("PINKU: You will know the answer to any questions if you use this.");
    print("That's all.");
  }
}
if (has("spell book")) {
  if (said("dhooa")) {
    print("No need of using this now.");
  }
}
if (has("spell book")) {
  if (said("Kali")) {
    print("No need of using this now.");
  }
}
if (has("spell book")) {
  if (said("pinku")) {
    print("No need of using this now.");
  }
}
return();


// Messages
#message 1 "The room is now visible to you."